// Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`,
// then press Enter. You can now see whitespace characters in your code.
public class Main {
    public static void main(String[] args) {
        Test1 test1 = new Test1();
        String[] arr = {"XYZE","SFZS","XDEE"};
        String word = "XYZZED";
        System.out.println(test1.exist(arr,word));
    }
}